package com.xiaoma.thread.Callable;

import java.util.concurrent.Callable;

/**
 * @author xiaomacdut
 * @date 2020年3月24日 下午12:43:28
 */
public class Task implements Callable<Integer>{
    
    @Override
    public Integer call() throws Exception{
        System.out.println("子线程在进行计算");
        Thread.sleep(3000);
        int sum = 0;
        for(int i = 0; i < 100; i++)
            sum += i;
        return sum;
    }
}
